3.2531 \(\int x^{-1+n} (a+b x^n)^2 \, dx\)

Optimal. Leaf size=19 \[ \frac {\left (a+b x^n\right )^3}{3 b n} \]

[Out]

1/3*(a+b*x^n)^3/b/n

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {261} \[ \frac {\left (a+b x^n\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 + n)*(a + b*x^n)^2,x]

[Out]

(a + b*x^n)^3/(3*b*n)

Rule 261

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rubi steps

\begin {align*} \int x^{-1+n} \left (a+b x^n\right )^2 \, dx &=\frac {\left (a+b x^n\right )^3}{3 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 19, normalized size = 1.00 \[ \frac {\left (a+b x^n\right )^3}{3 b n} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + n)*(a + b*x^n)^2,x]

[Out]

(a + b*x^n)^3/(3*b*n)

________________________________________________________________________________________

fricas [A]  time = 1.43, size = 32, normalized size = 1.68 \[ \frac {b^{2} x^{3 \, n} + 3 \, a b x^{2 \, n} + 3 \, a^{2} x^{n}}{3 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(a+b*x^n)^2,x, algorithm="fricas")

[Out]

1/3*(b^2*x^(3*n) + 3*a*b*x^(2*n) + 3*a^2*x^n)/n

________________________________________________________________________________________

giac [A]  time = 0.15, size = 32, normalized size = 1.68 \[ \frac {b^{2} x^{3 \, n} + 3 \, a b x^{2 \, n} + 3 \, a^{2} x^{n}}{3 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(a+b*x^n)^2,x, algorithm="giac")

[Out]

1/3*(b^2*x^(3*n) + 3*a*b*x^(2*n) + 3*a^2*x^n)/n

________________________________________________________________________________________

maple [B]  time = 0.02, size = 42, normalized size = 2.21 \[ \frac {a^{2} {\mathrm e}^{n \ln \relax (x )}}{n}+\frac {a b \,{\mathrm e}^{2 n \ln \relax (x )}}{n}+\frac {b^{2} {\mathrm e}^{3 n \ln \relax (x )}}{3 n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n-1)*(b*x^n+a)^2,x)

[Out]

a^2/n*exp(n*ln(x))+a*b/n*exp(n*ln(x))^2+1/3*b^2/n*exp(n*ln(x))^3

________________________________________________________________________________________

maxima [A]  time = 0.67, size = 17, normalized size = 0.89 \[ \frac {{\left (b x^{n} + a\right )}^{3}}{3 \, b n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)*(a+b*x^n)^2,x, algorithm="maxima")

[Out]

1/3*(b*x^n + a)^3/(b*n)

________________________________________________________________________________________

mupad [B]  time = 1.27, size = 27, normalized size = 1.42 \[ \frac {x^n\,\left (a^2+\frac {b^2\,x^{2\,n}}{3}+a\,b\,x^n\right )}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 1)*(a + b*x^n)^2,x)

[Out]

(x^n*(a^2 + (b^2*x^(2*n))/3 + a*b*x^n))/n

________________________________________________________________________________________

sympy [A]  time = 3.15, size = 37, normalized size = 1.95 \[ \begin {cases} \frac {a^{2} x^{n}}{n} + \frac {a b x^{2 n}}{n} + \frac {b^{2} x^{3 n}}{3 n} & \text {for}\: n \neq 0 \\\left (a + b\right )^{2} \log {\relax (x )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+n)*(a+b*x**n)**2,x)

[Out]

Piecewise((a**2*x**n/n + a*b*x**(2*n)/n + b**2*x**(3*n)/(3*n), Ne(n, 0)), ((a + b)**2*log(x), True))

________________________________________________________________________________________